import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    redirect:'/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/sc',
    component: () => import(/* webpackChunkName: "sc" */ '../views/Sc.vue')
  },
  {
    path: '/xx',
    component: () => import(/* webpackChunkName: "xx" */ '../views/Xx.vue')
  },
  {
    path: '/my',
    component: () => import(/* webpackChunkName: "my" */ '../views/My.vue')
  },
  {
    path: '/classify',
    component: () => import(/* webpackChunkName: "classify" */ '../views/Classify.vue')
  },
  {
    path: '/detail/:id',
    component: () => import(/* webpackChunkName: "detail" */ '../views/Detail.vue')
  },
  {
    path: '/cart',
    component: () => import(/* webpackChunkName: "cart" */ '../views/Cart.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
